{{template "header"}}

<title>{{.Topic.Title}}分类-beego 博客</title>
</head>

<body>

<div class="navbar navbar-default navbar-fixed-top">
    <div class="container">
    {{template "navbar" .}}
    </div>

</div>

<div style="height: 50px"></div>

<div class="container">
    <h1>{{.Topic.Title}}</h1>
     <h4>{{.Topic.Labels}}</h4>
    <h5>
    {{range .Tpoic}}
    <a href="/?label={{.}}">{{.}}</a>
            {{end}}
    </h5>

    <div class="btn btn-default">
        <a href="/topic/modify?tid={{.Tid}}">修改文章</a>
    </div>

    <div class="btn btn-default">
        <a href="/topic">返回</a>
    </div>

    <div style="height: 30px"></div>

    <div style="height: 50px">
        <table class="table table-bordered">
            <tr>
                <td>文章内容</td>
            </tr>
            <tr>
                <td><p class="lead">{{.Topic.Content}}</p></td>
            </tr>

            <tr>
                <td>文章标签</td>
            </tr>
            <tr>
                <td><p class="lead">{{.Topic.Labels}}</p></td>
            </tr>
        </table>
    </div>

    <div style="height: 60px">

    </div>

</div>

<div style="height: 150px"></div>

<div class="container">
    <div style="border-style: ridge;border-color:#f2dede">
        {{$tid := .Topic.Id}}
        <h2>评论内容</h2>
    {{range .Replay}}
            <hr>
        <h3>昵称： {{.Name}}<small>&nbsp;&nbsp;时间：{{.Create}}</small>&nbsp;&nbsp;
            <a class="btn btn-default" href="/replay/delete?tid={{$tid}}&rid={{.Id}}">删除</a></h3>

        回复内容：{{.Content}}
            <hr>
    {{end}}
    </div>

    <div style="height: 50px"></div>

<div style="border-style: ridge;border-color:#f2dede">
    <h3>本文回复</h3>

    <form method="post" action="/replay/add">

        <input type="hidden" name="tid" value="{{.Topic.Id}}">

        <div class="form-group">
            <label >显示昵称：</label>
            <input type="text" name="nickname" class="form-control">
        </div>

        <div>
            <label >内容：</label>
            <textarea name="content" cols="30" rows="10" class="form-control"></textarea>
        </div>

        <button class="btn btn-default">提交</button>

    </form>
</div>


</div>

<script type="text/javascript" src="http://cdn.staticfile.org/jquery/3.2.1/jquery.js"></script>
<script type="text/javascript" src="/static/js/bootstrap.min.js"></script>

</body>
</html>